﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Linq;
using System.Windows.Forms;
using System.Collections;
using System.Drawing.Drawing2D;


namespace Grizzy_X
{
    public class MBR
    {
        public float Lx, Ly, Rx, Ry;
        public void GetMBR(List<PointF> points)
        {
            Lx = points[0].X;
            Ly = points[0].Y;
            Rx = points[0].X;
            Ry = points[0].Y;
            for (int i = 0; i < points.Count(); i++)
            {
                if (points[i].X < Lx)
                    Lx = points[i].X;
                if (points[i].Y < Ly)
                    Ly = points[i].Y;
                if (points[i].X > Rx)
                    Rx = points[i].X;
                if (points[i].Y > Ry)
                    Ry = points[i].Y;
            }
        }
    }
}
